﻿using Test30.Core;

namespace Test30.Engine
{
    public class UnmovingPathfinder:IPathfinder
    {
        public Direction GetDirection(Monster monster, Entity target)
        {
            // default to not moving
            Direction direction = Direction.None;

            // if next to the target, attack
            Vec distance = target.Position - monster.Position;
            if (distance.KingLength == 1)
            {
                direction = Direction.Towards(distance);
            }

            return direction;
        }
    }
}
